package com.sbc.user.enums;

import com.sbc.convention.errorcode.IErrorCode;
import lombok.AllArgsConstructor;

/**
 * @description: 用户注册错误码枚举
 * @author: songbaicheng
 * @create: 2024-03-27 16:52
 **/
@AllArgsConstructor
public enum UserRegisterErrorCodeEnum implements IErrorCode {

    USER_REGISTER_FAIL("A006000", "用户注册失败"),
    USER_NAME_NOTNULL("A006001", "用户名不能为空"),
    PASSWORD_NOTNULL("A006002", "密码不能为空"),
    PHONE_NOTNULL("A006003", "手机号不能为空"),
    ID_TYPE_NOTNULL("A006004", "证件类型不能为空"),
    ID_CARD_NOTNULL("A006005", "证件号不能为空"),
    MAIL_NOTNULL("A006006", "邮箱不能为空"),
    REAL_NAME_NOTNULL("A006007", "邮箱不能为空"),
    TELEPHONE_REGISTERED("A006008", "手机号码已被注册"),
    ID_CARD_REGISTERED("A006009", "证件号码已被注册"),
    MAIL_REGISTERED("A006010", "邮箱已被注册"),
    USERNAME_REGISTERED("A006011", "用户名已被注册");

    /**
     * 错误码
     */
    private final String code;
    /**
     * 错误信息
     */
    private final String message;

    @Override
    public String code() {
        return code;
    }

    @Override
    public String message() {
        return message;
    }
}
